<?php
    // 删除评论接口

    include_once '../../fn.php';

    $id = $_GET['id'];
    // $id = 1;
    // 构造数据库执行串
    $sql = "delete FROM comments WHERE id='$id';";

    $result = my_exec($sql);

    if ($result['state']==200) {
        echo '删除成功';
    }elseif ($result['state']==100) {
        echo '删除失败';
    }
?>